home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-06-05 | 1.0 KB | 53 lines | [MATF/MATL] |
- function [fun,dfun,ifun,x0,m,C,Ax] = zsinde
- % Taylor series coefficient lists for several functions.
- % Pm(x) = c(1) + c(2)x + c(2)x^2 + ... + c(m+1)x^m
- % fun is the function, output.
- % dfun is the derivative, output.
- % ifun is the integral, output.
- % x0 is the point of expansion, output.
- % m is the degree of the polynomial, output.
- % C is the coefficient list, output.
- % Ax contains three asis vectors plotting, output.
- x0 = 0;
- m = 25;
- a = 0;
- b = 2*pi;
- ymin = -0.05;
- ymax = 0.4;
- ymin1 = -0.3;
- ymax1 = 1;
- ymin2 = 0;
- ymax2 = 0.6;
- Ax(1,:) = [a b ymin ymax];
- Ax(2,:) = [a b ymin1 ymax1];
- Ax(3,:) = [a b ymin2 ymax2];
- fun = 'sin(x)./exp(x)';
- dfun = 'cos(x)./exp(x) - sin(x)./exp(x)';
- ifun = '1/2-cos(x)./(2.*exp(x)) - sin(x)./(2.*exp(x))';
- C = [1/3786916514485104000000,
- 0,
- -1/12623055048283680000,
- 1/548828480360160000,
- -1/49893498214560000,
- 0,
- 1/237588086736000,
- -1/12504636144000,
- 1/1389404016000,
- 0,
- -1/10216206000,
- 1/681080400,
- -1/97297200,
- 0,
- 1/1247400,
- -1/113400,
- 1/22680,
- 0,
- -1/630,
- 1/90,
- -1/30,
- 0,
- 1/3,
- -1,
- 1,
- 0];
-